The present invention relates to an integrated circuit (IC) card containing integrated circuits such as a microcomputer and a memory unit, and particularly, to an IC card configured to arbitrarily divide a storage area of the memory unit depending on utilization purposes, thereby enabling efficient use of the limited memory capacity and allowing a general-purpose production system to be applied to the IC card production.
An IC card or so-called smart card is produced in various shapes, for example, there exist a flat card, a key-shaped card, and a rod-shaped card. The IC card of the present invention covers all of these cards.
An IC card contains elements such as a microprocessor (CPU) and a memory unit and hence is a small-sized information processing system having functions of decision and storage. Consequently, the data integrity and security can be further enhanced as compared with the conventional magnetic card such as a credit card or a bank card. Furthermore, since the storage capacity has been greatly increased through the advance of the IC technology, the IC card is regarded as efficient for the information storage card.
For the memory unit of an IC card, a nonvolatile IC memory such as an erasable, programmable read-only memory, EPROM in which stored data can be erased by ultraviolet radiation or an electrical, erasable, programmable read-only memory, EEPROM is used, and hence the storage contents can be kept therein without requiring a power source to be integrated in the card. Consequently, the memory unit can be produced in a simple structure and is thus adopted as the primary storage means of the IC card at present. However, a volatile IC memory such as a random access memory, RAM can also be used as the memory of the IC card if a long-life power supply such as a battery is built in the IC card to keep the contents thereof or as means for temporarily saving storage contents therein from another memory without integrating a power supply in the card.
In the past, data is generally stored in the IC memory as follows. A storage area having an appropriate size is allocated in the IC memory, and then the information of data is sequentially written beginning from an end thereof.
The entire information thus stored is conventionally read out at a time; or various information items are respectively stored in a plurality of storage areas, and a desired information is read by specifying the storage area number associated with the information, thereby retrieving the information from each storage area.
The information items to be stored in an IC card have various lengths. For example, the length of a name of Japanese is at most about 15 kana (Japanese syllabary) characters, which requires a record length of about 15 bytes (the length of a unit data to be stored). When considering change of the name due to marriage or adoption, about three records (the number of the unit data items to be stored) are necessary for the update of the name. Consequently, the required memory capacity for the name is 15 bytes.times.3 records=45 bytes. In contrast, since the sex field contains an indication of female or male, a 1-byte record is satisfactory. Ordinarily, the sex is not changed in usual cases, only one record is required, and hence the necessary memory capacity is 1 byte.times.1 record=1 byte.
Conventionally, when the size of a storage area or the number of records in a storage area is recorded in the memory, the address calculation is achieved on assumption that the record length is constant. In the foregoing example, the record length is set to 15 bytes according to the record length of name, that is, the record length of sex is also set to 15 bytes. However, only one byte is actually written in the 15-byte sex field, consequently the remaining 14 bytes are left blank, which deteriorates the memory utilization efficiency.
Moreover, since the required record length and number of records vary depending on the usages of the IC card, the memory allocation for the IC production must be changed for each kind of IC card. This requires a process step for generating a mask (allocation), soars the production cost, and increases the period of time required for the delivery of products; namely, a general-purpose production is not applicable.
In the past, even if a plurality of storage areas are included in an IC card, the same control is effected with respect to an access condition to any storage area, that is, the access condition is applied to all the storage areas. As a consequence, an access lock imposed on a storage area causes the other storage area to be subjected to the access lock. For example, for an IC card for which an access to a storage area is inhibited when the number of operations to input a wrong password value to the storage area exceeds the preset value, if the present value is exceeded, all storage areas or the entire IC card cannot be accessed.
Recently, an IC card or so-called complex IC card, has been proposed for an application in which transactions of the owner of the IC card with a plurality of different types of companies or enterprises including banks, department stores, and finance companies offering installment plans can be processed by use of the IC card. In such a card, the respective storage areas are used to store data of the different companies and hence must be controlled independently of each other. In the conventional IC card, however, the storage areas are controlled as an entity of the IC card, which may lead to an impingement of data security among the related companies or to an deterioration of the utilization efficiency of the IC card.